package org.wendu.wdoa.emp.model;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
import lombok.SneakyThrows;

import java.io.Serializable;
import java.util.Date;

@Data
public class Employee implements Serializable {
    private String e_id;
    private Integer d_id;
    private String e_name;
    private Integer e_sex;

    @JsonFormat(pattern = "yyy-MM-dd",timezone = "GMT+8")
    private Date e_birth;


    private String d_name;

    private boolean hasUser;

    private Integer hasMgr;

//    @SneakyThrows
//    @Override
//    public String toString() {
//        ObjectMapper objectMapper = new ObjectMapper();
//        String jsonStr = objectMapper.writeValueAsString(this);
//        return jsonStr;
//    }
}
